#ifndef SEARCHDIALOG_H
#define SEARCHDIALOG_H

#include <QDialog>
#include <QScrollArea>

namespace Ui {
class SearchDialog;
}

class SearchDialog : public QDialog
{
    Q_OBJECT

public:
    explicit SearchDialog(QWidget *parent = nullptr);
    ~SearchDialog();

    void search(const QString& searchText);

private slots:
    void on_lineEdit_search_returnPressed();

    void on_btn_close_clicked();

    void on_btn_interview_clicked();

private:
    void init();
    void initStyleSheet();
    void initPanel();
    void initBody();

    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    bool _isDraging = false;
    QPoint _dragPosition;

private:
    QWidget *_container = nullptr;
    QScrollArea *_scrollArea = nullptr;

    Ui::SearchDialog *ui;
};

#endif // SEARCHDIALOG_H
